from pydantic import BaseModel
from typing import Optional, List


class ContentQuery(BaseModel):
    topic_code: Optional[str] = None
    platforms: Optional[List[str]] = None
    time_start: Optional[str] = None
    time_end: Optional[str] = None
    ignore_time_filter: bool = False


class ContentItem(BaseModel):
    platform: str
    content_id: str
    author: Optional[str] = None
    title: Optional[str] = None
    text: Optional[str] = None
    url: Optional[str] = None
    published_at: Optional[str] = None
    metrics: Optional[dict] = None


class ContentList(BaseModel):
    items: List[ContentItem]
